package com.meilai.project.entity.administration.goods;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.meilai.project.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("goods_put_storage")
public class GoodsPutStorage extends BaseEntity {
    @ApiModelProperty("分组id")
    private Long group_id;
    @ApiModelProperty(value = "物品类型ID")
    private Long goods_type_id;
    @ApiModelProperty(value = "数量")
    private Long number;
    @ApiModelProperty(value = "单价，保留两位小数", example = "10.00")
    private BigDecimal price;
    @ApiModelProperty(value = "总价，保留两位小数", example = "10.00")
    private BigDecimal total_price;
    @ApiModelProperty("生产日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate product_date;
    @ApiModelProperty("到期日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate due_date;
    @ApiModelProperty(value = "入库人ID")
    private Long user_id;
}
